local gouxian_active = fk.CreateSkill{
  name = "xiaobai__gouxian_active",
}

gouxian_active:addEffect("active",{
  card_num = 0,
  target_num = 2,
  card_filter = Util.FalseFunc,
  target_filter = function (self, player, to_select, selected)
    local results = Self:getMark("xiaobai__gouxian-tmp")
    local n =to_select:getHandcardNum()
    if #selected == 0 then
      return table.find(results, function (dat)
        return table.contains(dat, n)
      end)
    elseif #selected == 1 then
      local n2 = selected[1]:getHandcardNum()
      for _, dat in ipairs(results) do
        if table.contains(dat, n) and table.contains(dat, n2) then
          if n ~= n2 then
            return true
          elseif #table.filter(dat, function (i)
            return i == n
          end) > 1 then
            return true
          end
        end
      end
    end
  end,
})


Fk:loadTranslationTable{
  ["xiaobai__gouxian_active"] = "构弦",
}

return gouxian_active